<template>
  <div class="hello">
    <h3 class="title">运行结果</h3>
    <div class="code-box" id="display"></div>
  </div>
</template>

<script>
import Vue from 'vue'
export default {
  name: 'ShowTable',
  data() {
    return {}
  },
  mounted() {
    this.init()
  },
  methods: {
    init() {
      console.log('开始挂载')
      var Profile = Vue.extend({
        template: '<div>{{firstName}} {{lastName}} aka {{alias}}</div>',
        data: function() {
          return {
            firstName: 'Walter',
            lastName: 'White',
            alias: 'Heisenberg'
          }
        }
      })
      new Profile().$mount('#display')
    }
  }
}
</script>
